package net.miranti.client;

import java.io.Serializable;

public class EntryBean<K, V> implements Serializable {
	public static final EntryBean EMPTY_KEY = new EntryBean();
	
	protected K key;
	private V value;
	
	protected EntryBean(){}

	public EntryBean(K id, V value) {
		this.key = id;
		this.value = value;
	}

	public K getKey() {
		return key;
	}

	public V getValue() {
		return value;
	}
	
	@Override
	public String toString(){
		return key + ":" + value;
	}
	
	@Override
	public boolean equals(Object obj){
		return key.equals(((EntryBean) obj).getKey());
	}
	
	@Override
	public int hashCode(){
		return key.hashCode();
	}
}
